From: Aaron Schulz Date: Wed, 28 Mar 2007 01:16:05 +0000 (+0000) Subject: *Don't embed $ns from string, for NS 0 it becomes '' and can break the query X-Git-Tag: 1.31.0-rc.0~53572 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=b413e7a7649a12afc5d766122eaf54ccd84d92d4;p=lhc%2Fweb%2Fwiklou.git *Don't embed $ns from string, for NS 0 it becomes '' and can break the query --- diff --git a/includes/SpecialLog.php b/includes/SpecialLog.php index 55b9e4e500..021a6202ab 100644 --- a/includes/SpecialLog.php +++ b/includes/SpecialLog.php @@ -131,10 +131,10 @@ class LogReader { $ns = $title->getNamespace(); if ( $pattern && !$wgMiserMode ) { $safetitle = $this->db->escapeLike( $title->getDBkey() ); // use escapeLike to avoid expensive search patterns like 't%st%' - $this->whereClauses[] = "log_namespace=$ns AND log_title LIKE '$safetitle%'"; + $this->whereClauses[] = "log_namespace=".$ns." AND log_title LIKE '$safetitle%'"; } else { $safetitle = $this->db->strencode( $title->getDBkey() ); - $this->whereClauses[] = "log_namespace=$ns AND log_title = '$safetitle'"; + $this->whereClauses[] = "log_namespace=".$ns." AND log_title = '$safetitle'"; } }